<script setup>
import { ref } from "vue";
import { useRoute,useRouter } from "vue-router";
import { ElMessage } from 'element-plus'
const router = useRouter()
const route =useRoute()

</script>
<template>
    <div class="admin-box">
        <!-- 头部 -->
        <el-menu
        :default-active="route.path"
        router
        class="el-menu-demo"
        mode="horizontal"
        @select="handleSelect"
        >
            <el-menu-item 
            index="/admin/article">管理帖子</el-menu-item>
            <el-menu-item 
            index="/admin/feedback">管理反馈</el-menu-item>
            <el-menu-item 
            index="/admin/user">管理用户</el-menu-item>
            <el-menu-item 
            index="/admin/role">管理角色</el-menu-item>
        </el-menu>
        <!-- 三级路由出口-->
        <router-view></router-view>
    </div>
</template>

<style lang="scss" scoped>
.admin-box{
    height: 85vh;
    overflow: scroll;
    //padding: 20px;
}
::-webkit-scrollbar{
    display: none;
    background-color: aliceblue;
}

</style>